//
// Created by z00850016 on 2025/8/21.
//

#ifndef LOCALVIT_LOCALMODELEXE_H
#define LOCALVIT_LOCALMODELEXE_H

#include "common.h"
#include "nnexecutor.h"
#include "Tokenizer.h"

namespace localvit {
    class LocalModelExe {
    public:
        LocalModelExe();

        virtual ~LocalModelExe();

        LocalModelExe(const LocalModelExe &) = delete;

        LocalModelExe(LocalModelExe &&) = delete;

        LocalModelExe &operator=(const LocalModelExe &) = delete;

        LocalModelExe &operator=(LocalModelExe &&) = delete;

        ModelStatus Init(const std::string &modelPath);

        ModelStatus DeInit();

        ModelStatus ProcessVit(std::vector<localvit::VisionBuffer> &inputBuffers,
                               std::vector<localvit::VisionBuffer> &outputBuffers);

        ModelStatus ProcessBert(const std::string &text,
                                std::vector<localvit::VisionBuffer> &outputBuffers);

    private:
        ModelStatus InitTokenizer(const std::string &vocabPath);
    private:
        NNExecutor nnExecutor;
        Tokenizer tokenizer;
    };
}

#endif //LOCALVIT_LOCALMODELEXE_H
